<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<title th:text="${session.title}">123</title>
	<link th:replace="common/header"/>
	<link rel="stylesheet" th:href="@{/css/ace-skins.min.css}" />
	</head>
	<body class="navbar-fixed">
  	<div th:replace="common/top"></div>
		<div class="container-fluid main_bg" id="main-container">
			<a id="menu-toggler" href="#"><span></span></a>
			<div th:replace="common/menu"></div>
			<div id="main-content" class="clearfix">
				<div id="page-content" class="clearfix">
					<div th:replace="common/title"></div>
						<h3 class="header smaller lighter blue" th:utext="'<em class=icon-eye-open></em>' + ${session.footUser.nike} + '的碎片合成'">123</h3>
						<div th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
							<div class="row-fluid" th:if="${null == footChip}">
							<!--PAGE CONTENT BEGINS HERE-->
								<div class="span12">
									<span th:text="'没有找到' + ${session.footUser.nike} + '的碎片信息'">123</span>
								</div>
							</div>
						<div th:if="${null != footChip}">
							<div class="row-fluid">
							<!--PAGE CONTENT BEGINS HERE-->
								<div class="span12">
									<div class="row-fluid">
									<!--PAGE CONTENT BEGINS HERE-->
										<div class="span1">
											<div class="control-group">
												<div class="controls">
													&nbsp;
												</div>
											</div>
										</div>
										<div class="span2">
											<div class="control-group">
												<div class="controls">
													<img th:src="@{/images/foot/white.png}" src="" alt=""/>
												</div>
												<div class="controls">
													<div class="row-fluid">
														<div class="span6" th:text="'白色碎片数量:' + ${footChip.haveWhile}">123</div>
														<div class="span6" th:if="${footChip.haveWhile >= 5}">
															<button class="btn-mini" type="button" onclick="getRandomPerson(1);"><em class="icon-arrow-left"></em>合成大众/白人</button>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="span2">
											<div class="control-group">
												<div class="controls">
													<img th:src="@{/images/foot/green.png}" src="" alt=""/>
												</div>
												<div class="controls">
													<div class="row-fluid">
														<div class="span6" th:text="'绿色碎片数量:' + ${footChip.haveGreen}">123</div>
														<div class="span6" th:if="${footChip.haveGreen >= 10}">
															<button class="btn-mini" type="button" onclick="getRandomPerson(2);"><em class="icon-arrow-left"></em>合成普通球星</button>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="span2">
											<div class="control-group">
												<div class="controls">
													<img th:src="@{/images/foot/blue.png}" src="" alt=""/>
												</div>
												<div class="controls">
													<div class="row-fluid">
														<div class="span6" th:text="'蓝色碎片数量:' + ${footChip.haveBlue}">123</div>
														<div class="span6" th:if="${footChip.haveBlue >= 15}">
															<button class="btn-mini" type="button" onclick="getRandomPerson(3);"><em class="icon-arrow-left"></em>合成洲际球星</button>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="span2">
											<div class="control-group">
												<div class="controls">
													<img th:src="@{/images/foot/purple.png}" src="" alt=""/>
												</div>
												<div class="controls">
													<div class="row-fluid">
														<div class="span6" th:text="'紫色碎片数量:' + ${footChip.havePurple}">123</div>
														<div class="span6" th:if="${footChip.havePurple >= 20}">
															<button class="btn-mini" type="button" onclick="getRandomPerson(4);"><em class="icon-arrow-left"></em>合成超级球星</button>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="span2">
											<div class="control-group">
												<div class="controls">
													<img th:src="@{/images/foot/orange.png}" src="" alt=""/>
												</div>
												<div class="controls">
													<div class="row-fluid">
														<div class="span6" th:text="'橙色碎片数量:' + ${footChip.haveOrange}">123</div>
														<div class="span6" th:if="${footChip.haveOrange >= 30}">
															<button class="btn-mini" type="button" onclick="getRandomPerson(5);"><em class="icon-arrow-left"></em>合成顶级球星</button>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="span1">
											<div class="control-group">
												<div class="controls">
													&nbsp;
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="row-fluid">
								<div class="text-center span12">
									<a class="btn" type="button" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
								</div>
							</div>
						</div>
					</div>
              		<!--/#page-content-->
				</div>
				<div th:replace="common/skin :: skin"></div>
		</div><!--/#main-content-->
	</div><!--/.fluid-container#main-container-->
	<div th:replace="common/js"></div>
	<script type="text/javascript">
		function getRandomPerson(type){
			$.ajax({
				type: "POST",
				dataType: "text",
				url: "/hy/footChip/compose",
				data: "type=" + type,
				success: function(data){
					if(data === 'relogin'){
						window.location.href="/logout";
					}else{
						showTip('tip', '获得了' + data, 4000); 
						window.setTimeout("refreshPage()",4000);
						 
					}
				}
			});
		}

		function refreshPage(){ 
			window.location.reload(); 
		} 
	</script>
	</body>
</html>
